Example: Pass in parameters for an Interview Portlet across WSRP

Example: Pass in parameters for an Interview Portlet across WSRP

We provide a sample implementation of a parameter setting portlet in the examples/interview-portlet/parameter-setting path of your Oracle Policy Automation Runtime Java implementation.

The portlet consists of a Java class ExampleParameterSettingPortlet and a deployment descriptor portlet.xml.

 

Note: In order to compile the Java class you will need an implementation of the JSR268 API.

 

For each parameter that the portlet wishes to set:

  1. portlet.xml contains:
    1. A supported-public-render-parameter element, nested inside the portlet element
    2. A public-render-parameter element, nested inside the portlet-app element.

      The namespace for each parameter needs to be http://oracle.com/opa/interview/portlet/10.0 (that is, it needs to match the appropriate namespace defined in the interview portlet's portlet.xml).
  2. The Java code sets every parameter using response.setRenderParameter("param", request.getParameter("param")); where "param" is the parameter name as defined in portlet.xml

 

To use this parameter setting example:

  1. Deploy the parameter setting portlet (use either examples/interview-portlet/parameter-setting/ExampleParameterSettingPortlet.war or compile your own as per the guidelines above).
  2. Deploy the Oracle Policy Automation Interview Portlet
  3. Place the parameter setting portlet and the Oracle Policy Automation Interview Portlet on the same page
  4. Input the parameters in the parameter setting portlet, and click the Submit button to pass parameters to the Oracle Policy Automation Interview Portlet